package Database;

import java.sql.Connection;
import java.sql.Statement;
import oracle.jdbc.pool.OracleDataSource;

public class CreateCache {

    public static void main(String[] args) {
        String url = "jdbc:oracle:thin:@localhost:1521:XE";
        String name = "hr";
        String pass = "12345";
        Connection con;
        try {

            OracleDataSource ods = new OracleDataSource();
            ods.setURL(url);
            con = ods.getConnection(name, pass);
            Statement stat = con.createStatement();
            String sql = "create table CACHE(DATA varchar2(10))";
            stat.executeQuery(sql);
            System.out.println("Tabel CACHE dibuat");
        } catch (Exception e) {
            System.out.println("Error: " + e.getMessage());
        }
    }
}
